#ifndef __USART_H__
#define __USART_H__
#include <main.h>

#define USART_CACHE_LEN			512
typedef struct {
    uint8_t data[USART_CACHE_LEN];
    uint16_t cnt;
} usart_cache;

extern usart_cache usart2_cache;
extern usart_cache usart3_cache;


typedef enum {
    BACKUP_485 = 3,
} Type485;


void usart2_init(void);
void usart3_init(void);

uint8_t usart_trans(USART_Module* USARTx, uint8_t* Data, uint16_t DataLen);
uint8_t usart_485initial(Type485 Name485);
uint8_t usart_485trans(Type485 Name485, uint8_t* Data, uint16_t DataLen);

#endif

